home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / OBJ1_2.ZIP;1 / C_FINFO.TXT < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.9 KB  |  79 lines

  1. '
  2. 'Class description:
  3. '
  4. !short:FInfo class structure:
  5. Class FInfo:
  6. ~~~~~~~~~~~~
  7. This class appends the class Info with viewing of the big text file.
  8.  
  9. Common use:
  10. ~~~~~~~~~~~
  11. If you want to enable the file selection you can use the only program line:
  12.  
  13.   FInfoShow("*.txt")   //viewing of any file of the *.txt set.
  14.  
  15. or if you want to view the specific file you can use following two lines
  16. of program:
  17.  
  18.   LOCAL OBJECT Fi OF FInfo
  19.   Fi:Init("MyFile.txt")   //could be GoodInit(...), parameters (if any)
  20.  
  21. Source code is in C_FInfo.prg
  22.  
  23. !seealso: c_box.ngo:Box c_info.ngo:Info c_task.ngo:Task c_color.ngo:Color ob_class.ngo:"Class hierarchy" ob_funct.ngo:FInfoShow
  24.  
  25. !short:~~~~~~~~~~~~~~~~~~~~~~
  26. !short:create class FInfo from Info
  27. !short:  export:
  28. !short:  var BigFile  //false
  29. ^BFInfo:BigFile^N: private: logical
  30.   This variable serves as help information if the file is shorter than the
  31.   volume of instvar variable Buff or if it is a need to read dynamicaly the
  32.   file part after part to the buffer.
  33.   (FInfo enables unlimited long file view)
  34.  
  35. !short:  var FHandle  //0
  36. ^BFInfo:FHandle^N: private: numeric
  37.   The file acces variable (file handle) is stored here for text file read.
  38.  
  39. !short:  var FSize    //0
  40. ^BFInfo:FSize^N: read-only: numeric
  41.   Viewed file size.
  42.  
  43. !short:  method New=FInfoNew          //o:New() --> self
  44. ^BFInfo:New()^N: public: return self
  45.   Fills the object with default values.
  46.  
  47. !short:  method Init=FInfoInit        //o:Init(FName,WinName,R,C,Rs,Cs,Clr,Shd) --> true/false
  48. ^BFInfo:Init(FName,WinName,R,C,Rs,Cs,Clr,Shadow)^N: public: return true/false
  49.   The FName parameter must be set, if there is no such file the method
  50.   returns false otherwise returns the object as file viewing task.
  51.   Other parameters are past to parent set ^UBox^N, so for their description
  52.   look at the method Box:Init(...)
  53.  
  54. !short:  method GoodInit=FInfoGoodInit//o:GoodInit(FNam,WNam,R,C,Rs,Cs,CSize,Clr,Shd) --> true/false
  55. ^BFInfo:GoodInit(FName,WinName,R,C,Rs,Cs,CurSize,Clr,Shadow)^N: public:
  56.   return true/false
  57.   It is the same as FInfo:Init(...), but by window positioning is used
  58.   the ^UGoodInit^N method defined in parent class Box. For the parameter
  59.   FName are the same rules valid and for other parameters look at
  60.   Box:GoodInit(...)
  61.  
  62. !short:  method Print=FInfoPrint      //o:Print() --> true
  63. ^BFInfo:Print()^N: public: return true
  64.   Sends the file to print by using the dos command PRINT.
  65.   Remember that resident portion of dos command PRINT must be loaded into
  66.   memory before our program.
  67.  
  68. !short:  method VProcess=FInfoVProcess//o:VProcess() --> true
  69. ^BFInfo:VProcess()^N: private: return true
  70.   Method VPRocess() is appended from herited class Info with the dynamicaly
  71.   reading of text from viewed file.
  72.  
  73. !short:  method Done=FInfoDone        //o:Done() --> true/false
  74. ^BFInfo:Done()^N: public: return true/false
  75.   Ends the task and closes the viewed file.
  76.  
  77. !short:  endclass
  78.  
  79.